import { Spin } from 'antd';
import { ReactNode, Suspense } from 'react';

export const LazyComponent = ({ children }: { children: ReactNode }) => {
  return (
    <>
      <Suspense
        fallback={
          <div>
            <Spin size="large" />
          </div>
        }
      >
        {children}
      </Suspense>
    </>
  );
};
